var express = require('express');
var db = require('./db.js')
var router = express.Router()
var bodyParser = require('body-parser');
var md5 = require('md5-nodejs');
var urlencodedParser = bodyParser.urlencoded({ extended: false })
var multer = require('multer');

router.get('/list', async function (req, res) {
    let sql = `select d.*,m.* from discuss as d,msbd as m where d.bdid=m.id order by d.id desc`
    const data = await db.doSql(sql)
    res.send(JSON.stringify(db.heal(data)))
})


module.exports = router